package com.homedo.odin.solution.dao;

import com.homedo.core.common.base.dao.BaseDao;
import com.homedo.odin.solution.model.entity.SpecialColumn;
import java.util.Date;
import java.util.List;
import java.util.Set;
import org.apache.ibatis.annotations.Param;

/**
 * <p> 栏目 Mapper 接口 </p>
 *
 * @author HarveyDing
 * @since 2018-03-08
 */
public interface SpecialColumnMapper extends BaseDao<SpecialColumn> {

    SpecialColumn getSpecialColumn(@Param("columnId") Long columnId);

    void addSpecialColumnCommentCount(@Param("columnId") Long columnId);

    List<SpecialColumn> querySpecialColumnListMngByParams(@Param("columnTitle") String columnTitle,
            @Param("expertName") String expertName, @Param("columnType") Integer columnType,
            @Param("createStartTime") Date createStartTime,
            @Param("createEndTime") Date createEndTime, @Param("status") Integer status);

    List<SpecialColumn> queryColumnByTagId(@Param("tagId") Integer tagId);

    List<SpecialColumn> queryColumnListToPc(@Param("columnType") Integer columnType, @Param("tagId") Integer tagId);

    List<SpecialColumn> queryColumnListForBrandFirm(@Param("userId") Integer userId,
            @Param("columnType") Integer columnType);

    List<SpecialColumn> queryColumnsByTageName(@Param("tagName") String tagName);

    Long queryLastSpecialColumn(@Param("createTime") Date createTime);

    Long queryNextSpecialColumn(@Param("createTime") Date createTime);

    SpecialColumn queryRecentNextSpecialColumn(@Param("columnType") Integer columnType);

    void addSpecialColumnPageView(@Param("columnId") Long columnId);

    void addSpecialColumnCollectCount(@Param("columnId") Long columnId);

    void addSpecialColumnLike(@Param("columnId") Long columnId);

    List<SpecialColumn> selectSpecialColumnByColumnIdsAndReleased(@Param("columnIds") List<Long> columnIds,
            @Param("statusDbvalue") int statusDbvalue);

    List<SpecialColumn> selectByTagId(@Param("tagId") Integer tagId, @Param("columnType") Integer columnType);

    List<SpecialColumn> selectByEntity(@Param("specialColumn") SpecialColumn specialColumn);

    List<SpecialColumn> querySpecialColumnListByCreateTime(@Param("columnType") Integer columnType,
            @Param("createTime") Date createTime);

    List<SpecialColumn> selectByTagIdsOrExpertIdOrColumnTypeOrStatus(@Param("tagIds") Set<Integer> tagIds,
            @Param("expertId") Integer expertId, @Param("columnType") Integer columnType,
            @Param("status") Integer status);

    void updateTagIdByTagIds(@Param("tagIds") Set<Integer> tagIds, @Param("targetTagId") Integer targetTagId);

    Integer selectCountByTagIds(@Param("tagIds") Set<Integer> tagIds);
}